﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media.Imaging;
using System.Windows.Media;
using SilverTile.Xaml;

namespace SilverTile
{
    public interface IViewport : IRenderable
    {

        BitmapSource Output { get; }
        Color BackgroundColor { get; set; }

        IDictionary<string, ISprite> ActiveSprites { get; }
        IEnumerable<ISprite> BackgroundSprites { get; }

        void AddSprite(string key, ISprite sprite);
        void AddBackgroundSprite(ISprite sprite, int x, int y);
        ISprite RemoveSprite(string key);
        ISprite RemoveSprite(ISprite sprite);

        void RenderTileRowOverwrite(int x, int y, int xfrom, int xto, int row, int tileWidth, int[] pixels);

        void SetGameArea(GameArea gameArea);

        void Render();

        IEnumerable<ISprite> GetForegroundSpriteCollisions(ISprite sprite1);
        IEnumerable<ISprite> GetForegroundSpriteCollisions(ISprite sprite1, int expandBy);

        Collision SpriteWillCollideWithBackground(ISprite sprite, int x, int y, int expandBy);
    }
}
